<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="__STATIC__/css/seller_center.css" rel="stylesheet" type="text/css">
    <style type="text/css">
        body {
            background: #FFF none;
        }
        .order-info tfoot tr th span {
            line-height: 20px;
            display: inline-block;
            width: 100%;
            height: 20px;
            padding: 0;
            margin: 0;
            border: 0;
            text-overflow: ellipsis;
        }
    </style>
    <script src="__STATIC__/js/jquery-3.1.1.js"></script>
    <script src="__STATIC__/ext/layui/layui.js"></script>
    <script>
        window.ns_url = {
            baseUrl: "ROOT_URL/",
            route: ['{:request()->module()}', '{:request()->controller()}', '{:request()->action()}'],
        };
    </script>
    <script type="text/javascript" src="__STATIC__/js/common.js" charset="utf-8"></script>
    <script type="text/javascript" src="__STATIC__/js/jquery.printarea.js" charset="utf-8"></script>
    <title>原始发货单 - {$shop_info['site_name']|default=""}</title>
</head>
<body>
{notempty name="order_detail"}
<div class="print-layout">
    <div class="print-btn" id="printbtn" title="选择喷墨或激光打印机<br/>根据下列纸张描述进行<br/>设置并打印发货单据"><i></i><a href="javascript:void(0);">打印</a></div>
    <div class="a5-size"></div>
    <dl class="a5-tip">
        <dt>
            <h1>A5</h1>
            <em>Size: 210mm x 148mm</em></dt>
        <dd>当打印设置选择A5纸张、横向打印、无边距时每张A5打印纸可输出1页订单。</dd>
    </dl>
    <div class="a4-size"></div>
    <dl class="a4-tip">
        <dt>
            <h1>A4</h1>
            <em>Size: 210mm x 297mm</em></dt>
        <dd>当打印设置选择A4纸张、竖向打印、无边距时每张A4打印纸可输出2页订单。</dd>
    </dl>
    <div class="print-page">
        <div id="printarea">
            <div class="orderprint">
                <div class="top">
                    <div class="full-title">{$order_detail.offer_name} 发货单</div>
                </div>
                <table class="buyer-info">
                    <tr style="height: 25px;line-height: 25px">
                        <td>收货人：{$order_detail.name}</td>
                        <td></td>
                        <td>电话:{$order_detail.mobile}</td>
                    </tr>
                    <tr style="height: 25px;line-height: 25px">
                        <td colspan="3">客户地址：{$order_detail.full_address} {$order_detail.address}</td>
                    </tr>
                    <tr style="height: 25px;line-height: 25px">
                        <td>订单号：{$order_detail.order_no}</td>
                        <td></td>
                        <td>下单时间：{$order_detail.create_time|date="Y-m-d h:i:s"}</td>
                    </tr>
                </table>
                <table class="order-info">
                    <thead>
                        <tr>
                            <th class="w40">序号</th>
                            <th class="tl">货物名称及规格</th>
                            <th class="tl">数量</th>
                            <th class="tl">单价</th>
<!--                            <th class="tl">改价</th>-->
                            <th class="tl">金额</th>
                            <th class="tl">备注</th>
                        </tr>
                    </thead>
                    <tbody>
                        {php}
                            $rowspan = count($order_detail['order_goods']);
                        {/php}
                        {foreach $order_detail['order_goods'] as $list_k => $order_goods_item}
                            <tr>
                                <td>{$list_k+1}</td>
                                <td class="tl">{$order_goods_item.sku_name}</td>
                                <td>{$order_goods_item.num}</td>
                                <td class="tl">{$order_goods_item.true_price}</td>
<!--                                <td class="tl">{//$order_goods_item.adjust_money > 0 ? '+'.$order_goods_item.adjust_money : $order_goods_item.adjust_money}</td>-->
                                <td class="tl">{$order_goods_item.goods_money}</td>
                                {if $list_k == 0}
                                <td class="tl" rowspan="{$rowspan}">{$order_detail.remark}</td>
                                {else /}
                                <td class="tl"></td>
                                {/if}
                            </tr>
                        {/foreach}
                        <tr>
                            <th></th>
                            <th class="tl">合计：￥{$order_detail.origin_order_money}<br />大写：{:get_amount($order_detail.origin_order_money)}</th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                        </tr>
                    </tbody>
                    <tfoot>
                        <tr style="height: 100px;line-height: 100px;">
                            <td></td>
                            <td colspan="3">送货单位：（盖章）</td>
                            <td colspan="3">收货单位：（盖章）</td>
                        </tr>
                    </tfoot>
                </table>
                <div class="explain"></div>
            </div>
        </div>
    </div>
</div>
{/notempty}
</body>
<script>
    $(function(){
        $("#printbtn").click(function(){
            $("#printarea").printArea();
        });
    });
</script>
</html>